

/**
 * The test class TestEntreprise.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class TestNmbLogosEntreprise extends junit.framework.TestCase
{

    /**
     * Default constructor for test class TestEntreprise
     */
    public TestNmbLogosEntreprise()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    protected void setUp()
    {

	}

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    protected void tearDown()
    {
    }

	public void testAjoutLogo()
	{
		Logo logo = new Logo();
		Entreprise entreprise = new Entreprise();
		assertEquals(0, entreprise.getNmbLogos());
		logo.setProprietaire(entreprise);
		assertEquals(1, entreprise.getNmbLogos());

	}
	
	public void testSuppLogo()
	{
		Logo logo = new Logo();
		Entreprise entreprise1 = new Entreprise();
		Entreprise entreprise2 = new Entreprise();
		logo.setProprietaire(entreprise1);
		assertEquals(1, entreprise1.getNmbLogos());
		logo.setProprietaire(entreprise2);
		assertEquals(0, entreprise1.getNmbLogos());
		

	}
	
	public void testNmbLogo()
	{
		Logo logo1 = new Logo();
		Logo logo2 = new Logo();
		Logo logo3 = new Logo();
		Entreprise entreprise = new Entreprise();
		logo1.setProprietaire(entreprise);
		logo2.setProprietaire(entreprise);
		logo3.setProprietaire(entreprise);
		assertEquals(3, entreprise.getNmbLogos());		

	}
}

